<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/fn.tld" prefix="fn" %>
<div title="设备应用单元维护" id="deviceApplicationUnitSelectDialog" class="dialogtitle">
	<div class="searchbox">
		<span class="fontRed">注:</span>带""为必填项
		<form id="frmDeviceApplicationUnit" onSubmit="return false">
			<input type="hidden" name="id" value="<c:out value='${deviceApplicationUnit.id }'/>">
			<table id="deviceApplicationUnitTable" class="rvimsbordercolor" cellspacing="0" cellpadding="0" style="border-top-width:1px;">
				<tr>
					<td align="right" style="width: 114px;">单元名称：<span class="fontRed">*</span></td>
					<td><input type="text" name="unitName" id="unitName" value=""></td>
					<td align="right" style="width: 114px;">单元编号：<span class="fontRed">*</span></td>
					<td><input type="text" name="unitCode" id="unitCode" value=""></td>
				</tr>
				<tr>
					<td align="right" style="width: 114px;">所属单位：&nbsp;</td>
					<td>
						<select id="ownedOrganization" name="ownedOrganization" style="width: 189px; ">
							<option value="">---请选择---</option>
						</select>
					</td>
					<td align="right" style="width: 114px;">所属系统：&nbsp;</td>
					<td><input type="text" name="ownedSystem" id="ownedSystem" value=""></td>
				</tr>
				<tr>
					<td align="right" style="width: 114px;">所在位置：&nbsp;</td>
					<td colspan="2"><input type="text" style="width:350px" name="location" id="location" value=""></td>
					<td><button onclick="">获取经纬度坐标</button></td>
				</tr>
				<tr>
					<td align="right" style="width: 114px;">经度：&nbsp;</td>
					<td><input type="text" name="Longitude" id="Longitude" value=""></td>
					<td align="right" style="width: 114px;">纬度：&nbsp;</td>
					<td><input type="text" name="Latitude" id="Latitude" value=""></td>
				</tr>
				<tr>
					<td align="right" style="width: 114px;">添加图片：&nbsp;</td>
					<td colspan="2"><input type="text" style="width:350px" name="" id="" value=""></td>
					<td style="width: 230px;">
						<input type="file" name="fileField" id="fileField" style="width: 230px;" onchange="readURL(this);" />
					</td>
				</tr>
				<tr>
					<td align="left" colspan=4 style="width: 140px; height: 50px;border-top-width:1px; border-top-style: dashed;" class="rvimsbordercolor">
						<img src="http://t2.gstatic.com/images?q=tbn:ANd9GcQPVzYsWtUoKnZ4Gg9jFHticUh-YAPqN2KNprlXL0jsItLlZqvY" id="imageURL" width="250"  height="180" />
					</td>
				</tr>
			</table>
		</form>
		<div id="">
			<span class="fontRed">提示：</span>1.图片大小不能大于1M<br>
			2.图片格式为：jpg、jpeg、gif、png、bmp
		</div>
	<div id="infoDeviceApplicationUnit" class="fontRed"></div>
	</div>
</div>			
<script>
	$("button").button();
	function readURL(input) {
		if (input.files && input.files[0]) {
			var reader = new FileReader();
			reader.onload = function (e) {
				$('#imageURL').attr('src', e.target.result).width(250).height(180);
			};
			reader.readAsDataURL(input.files[0]);
		}
	}
</script>
